#define	_CRT_SECURE_NO_WARNINGS 1 

#include "ListNode.h"


int main()
{
	ListNode* plist = CreatHeadNode();

	LNPushBack(plist, 1);
	LNPushBack(plist, 2);
	LNPushBack(plist, 3);
	LNPushBack(plist, 4);
	LNPushBack(plist, 5);

	LNPrint(plist);

	LNPopBack(plist);
	LNPopBack(plist);

	LNPrint(plist);

	LNPushFront(plist, 10);
	LNPushFront(plist, 20);
	LNPushFront(plist, 30);

	LNPrint(plist);

	LNPopFront(plist);

	LNPrint(plist);

	ListNode* pos = Find(plist, 1);
	LNInsert(pos, 9);
	LNInsert(pos, 8);

	LNPrint(plist);

	//pos = Find(plist, 30);
	//LNErase(pos);
	pos = Find(plist, 20);
	LNErase(pos);

	LNPrint(plist);

	LNDestory(plist);

	LNPrint(plist);

	LNPushBack(plist, 1);
	LNPushBack(plist, 2);
	LNPushBack(plist, 3);
	LNPushBack(plist, 4);
	LNPushBack(plist, 5);

	LNPrint(plist);
}